package com.chinatelecom.check.controller;

import com.chinatelecom.check.entity.CheckTable;
import com.chinatelecom.check.model.CheckTableModel;
import com.chinatelecom.check.service.CheckTableService;
import com.chinatelecom.framework.model.PageData;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.chinatelecom.framework.model.PageParam;
import com.chinatelecom.framework.model.R;

import cn.hutool.core.bean.BeanUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;



@Api(tags="CheckTable-量表检测接口")
@RestController
@RequestMapping(value="/CheckTable")
@Slf4j
public class CheckTableController  {
	
	private final String info_prefix = "[CheckTable模块]";

	@Autowired
	private CheckTableService checkTableService;

	@ApiOperation(value="CheckTable分页列表")
	@GetMapping(value = "list")
	public R list(PageParam pageParam, CheckTableModel businessParam){
		log.debug("{}-列表数据", info_prefix);
		PageData<CheckTableModel> data =  checkTableService.page(pageParam, businessParam);
		return R.ok().data(data);
	}

	@ApiOperation(value="CheckTable详情")
	@GetMapping("/view/{id}")
	public R view(@PathVariable Integer id){
		log.debug("{}-查看CheckTable信息", info_prefix);
		CheckTableModel data = checkTableService.getDetail(id);
		return R.ok().data(data);
	}
	
	@ApiOperation(value = "查看CheckTable属性")
	@GetMapping("/model")
	public CheckTable model() {
		return null;
	}
	
}
